import React from 'react';
import { Button,type ButtonProps } from 'antd';
import './DangerButton.css';

interface DangerButtonProps extends ButtonProps {
  children: React.ReactNode;
  confirm?: boolean;
}

export const DangerButton: React.FC<DangerButtonProps> = ({
  children,
  className = '',
  confirm = true,
  ...props
}) => {
  return (
    <Button
      className={`danger-button ${className}`}
      type="primary"
      danger={confirm}
      {...props}
    >
      {children}
    </Button>
  );
};
